<div class="weekdays">
  <% (@start_date..@end_date).to_a.reverse.each do |date| %>
      <div class="date-card date-<%= date.to_s %> card-transparent transition">
        <% unless date == Date.today %>
            <%= link_to date.strftime('%A %d %B %Y'), calendar_day_path(:date => date.to_s), :remote => true, :class => 'cal-date' %>
        <% else %>
            <%= link_to 'Today', calendar_day_path(:date => date.to_s), :remote => true, :class => 'cal-date' %>
        <% end %>
        <% if date <= Date.today && date >= 5.days.ago %>
            <%= link_to 'Add log', new_work_log_path(:date => date), :remote => true, :class => 'btn btn-sec right' %>
        <% end %>
        <div class="entries">
          <ul>
            <% @entry_hash[date].each do |e| %>
                <li>
                  <%= link_to "#{e.task.try(&:name)}(#{e.hours})", work_log_path(e), :remote => true %>
                </li>
            <% end %>
          </ul>
        </div>
      </div>
  <% end %>
</div>
<div class="week-nav">
  <%= link_to calendar_week_path(:date => @start_date-7.days), :remote => true do %>
      <div class="prev icon left"></div>
  <% end %>
  <%= link_to calendar_week_path(:date => @end_date+1.days), :remote => true do %>
      <div class="next icon right"></div>
  <% end %>
</div>